<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="commonHead">
    <meta charset="UTF-8">
    <title>Title</title>
<!--    css,img资源-->
    <link href="../static/bootstrap-4.6.1-dist/css/bootstrap.min.css" th:href="@{/bootstrap-4.6.1-dist/css/bootstrap.min.css}" rel="stylesheet" type="text/css">
    <script src="../static/jQuery/jquery-3.6.0.min.js" th:src="@{/jQuery/jquery-3.6.0.min.js}"></script>
    <script src="../static/jQuery/jquery.cookie.js" th:src="@{/jQuery/jquery.cookie.js}"></script>
    <script src="../static/bootstrap-4.6.1-dist/js/bootstrap.bundle.js" th:src="@{/bootstrap-4.6.1-dist/js/bootstrap.bundle.js}"></script>
    <script type="text/javascript" src="../static/js/publicPart.js" th:src="@{/js/publicPart.js}"></script>
    <link href="../static/css/publicPart.css" rel="stylesheet" th:href="@{/css/publicPart.css}">

    <link href="../static/css/login.css" rel="stylesheet" th:href="@{/css/login.css}">
</head>
<body>
<div class="main">
    <!-- 导航栏部件 -->
    <div class="nav-replace" th:fragment="navbar">
        <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" aria-label="Ninth navbar example">
            <div class="container-fluid">
                <a class="navbar-brand" href="#">Home</a>
<!--                导航栏折叠-->
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar" >
                    <span class="navbar-toggler-icon"></span>
                </button>

                <div class="collapse navbar-collapse" id="collapsibleNavbar">
                    <ul class="navbar-nav ">
                        <li class="nav-item">
                            <a class="nav-link" href="/demo">博客</a>
                        </li>
                        <li class="nav-item dropdown">

                        </li>
                    </ul>

                    <form class="m-auto d-flex" id="formSearch" action="/demo/search" method="get">
                        <input class="form-control mr-2 inputSearch" type="text" name="content"placeholder="Search" aria-label="Search">
                        <button class="btn btn-outline-success" id="btnSearch" type="submit">Search</button>
                    </form>

                    <ul class="nav-item navbar-nav" th:if="${session.userInfo == null}">
                        <a class="" href="/demo/login">登录\注册</a>
                    </ul>
                    <ul class="nav-item navbar-nav" th:fragment="nav-user-image" th:if="${session.userInfo != null}">
<!--                        <li class="mr-1">-->
<!--                            <a class="m-auto nav-link" href="#" data-toggle="modal" data-target="#fileModal">附件库</a>-->
<!--                        </li>-->
                        <li class="d-flex dropdown">
                            <img class="img-circle" src= alt="头像" style="border-radius: 50%;width:37.99px;height:37.99px;"  th:src="${session.userInfo.userIcon}">
                            <a class="nav-link dropdown-toggle" href="#" id="dropdown07XL" data-toggle="dropdown" th:text="${session.userInfo.userName}"></a>

                            <ul class="dropdown-menu dropdown-menu-right dropdown" aria-labelledby="dropdown">
                                <li><a class="dropdown-item" href="/demo/userInfoPage">个人信息</a></li>
                                <li th:if="${session.userInfo.userLevel > 0}"><a class="dropdown-item" href="/demo/admin">后台管理</a></li>
                                <div class="dropdown-divider"></div>
                                <li><a class="dropdown-item" href="/demo/write">写文章</a></li>
                                <li><a class="dropdown-item" href="/demo/home/" th:href="@{'/home/'+${session.userInfo.userId}}">我的博客</a></li>
                                <li><a class="dropdown-item" href="/demo/faceAdd">人脸信息</a></li>
                                <div class="dropdown-divider"></div>
                                <li><button class="dropdown-item " type="button" id="btnLogout"href="/demo/logout">登出</button></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
        <div style="margin-top: 60px" ></div>
    </div>

<!--    margin-top: 55.82px  标签需要设定外边框-->
</div>

</body>
<!--    js资源-->
</html>